<template>
  <el-dialog title="反馈信息" :visible.sync="visible"  :before-close="close">
    <el-form ref="auditForm" :model="form" label-width="120px" label-position="left" :rules="rules" >
      <el-form-item label="是否解决" prop="resource">
        <el-radio-group v-model="form.resource" >
          <el-radio v-for="item in isSolve" :label="item.value" :key="item.label"> {{item.label}}</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="解决方案：" prop="desc">
        <el-input type="textarea" :rows="4" v-model="form.desc" placeholder="请输入解决方案" prop="desc"></el-input>
      </el-form-item>
    </el-form>

    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="close">关闭</el-button>
      <el-button type="primary" @click="upgrade">反馈至品质部</el-button>
    </div>
  </el-dialog>
</template>

<script>
import {mapGetters} from "vuex";

export default {
  props: ['visible'],
  data() {
    return {
      isSolve:[
        {value: 'true',label: '是'},
        {value: 'false',label: '否'},
      ],
      form:{
        resource:'true'
      },
      rules:{},
    }
  },
  computed: {
    ...mapGetters(["permission"]),
  },
  mounted() {
  },
  methods: {
    close() {
      this.$refs['auditForm'].resetFields();
      this.$emit('update:visible', false);
    },
    upgrade(){
      console.log(this.form)
      console.log(111)
    }
  },

}
</script>
